package com.qcby.train.mybaitsplusdemo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qcby.train.mybaitsplusdemo.entity.Student;
import com.qcby.train.mybaitsplusdemo.entity.Teacher;
import com.qcby.train.mybaitsplusdemo.mapper.StudentMapper;
import com.qcby.train.mybaitsplusdemo.mapper.TeacherMapper;
import com.qcby.train.mybaitsplusdemo.service.IStudentService;
import com.qcby.train.mybaitsplusdemo.service.ITeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @className: TeacherServiceImpl
 * @description:
 * @author: lxt
 * @create: 2021-04-26 20:35
 **/
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public IPage<Teacher> listAll(IPage<Teacher> page) {
        List<Teacher> teachers = teacherMapper.listAll(page);
        page.setRecords(teachers);
        return page;
    }
}
